package com.gxa.service.impl;

import com.gxa.common.R;
import com.gxa.mapper.SalesQueryMapper;
import com.gxa.service.QueryCommonService;
import com.gxa.service.SalesQueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
@Service
public class QuerySalesServiceImpl implements SalesQueryService {
    R r=new R();
    @Autowired(required = false)
    private SalesQueryMapper salesQueryMapper;
    @Override
    public R querySales(Map map) {
        List<Map> result=salesQueryMapper.querySales(map);
        if (result!=null){
            r.setCode(200);
            r.setData(result);
        }
        return r;
    }

    @Override
    public R updateSales(Map map) {
        int result=salesQueryMapper.updateSales(map);
        if (result>0){
            r.setCode(200);
            r.setMsg("审核成功！");
            r.setData(result);
        }
        return r;
    }
}
